<template>
	<com-panel-doctor :doctor="item"  v-for="(item,index) in props.list" :props="{hospitalRank: 'hospitalLevel'}" :returnVisit="props.returnVisit" :key="index">
		<view>
			<view class="doctor-data">
				<view>问诊量<text>{{item.consultationNum}}</text></view>
				<view>好评率<text>{{item.favorableRate}}%</text></view>
				<view>响应<text>{{item.answerSpeed>100?'>60分钟':item.answerSpeed == 0?'极快':item.answerSpeed+'分钟'}}</text></view>
			</view>
			<view v-if="item.meritIllness" class="doctor-explain">{{item.meritIllness}}</view>
			<view class="doctor-tags">
				<!-- <com-tag v-if="item.consultationCommentRate >= 99" type="warning">口碑极佳</com-tag> -->
				<com-tag type="warning">口碑极佳</com-tag>
				<com-tag v-if="item.prescriptionAllow === 1" type="success">可开处方</com-tag>
				<com-tag v-if="item.examinationAllow === 1">可开检查</com-tag>
				<com-tag v-if="item.lastDateAndType" type="already" class="newAlready">{{ item.lastDateAndType }}</com-tag>
				<!-- <view v-if="!item.onLine" class="doctor-isNotOnline">
					离线
				</view> -->
			</view>
			<!-- <view v-if="item.txtStatus || item.phoneStatus || item.videoStatus" class="doctor-action">
				<view v-if="item.txtStatus" class="doctor-action-item">
					<com-icon name="gy_icon_tuwen" color="#07BF66" ></com-icon>
					<div  v-if="item.txtPrice <= 0">免费</div>
					<com-price-text v-else :price="item.txtPrice" color="#2E344A" />
				</view>
				<view v-if="item.phoneStatus" class="doctor-action-item">
					<com-icon name="gy_icon_dianhua" color="#07BF66"></com-icon>
					<div  v-if="item.phonePrice <= 0">免费</div>
					<com-price-text v-else :price="item.phonePrice" color="#2E344A" />
				</view>
				<view v-if="item.videoStatus" class="doctor-action-item">
					<com-icon name="gy_icon_shipinzixun" color="#07BF66"></com-icon>
					<div  v-if="item.videoPrice <= 0">免费</div>
					<com-price-text v-else :price="item.videoPrice" color="#2E344A" />
				</view>
			</view> -->
		</view>
	</com-panel-doctor>
	<com-empty v-if="list.length === 0" text="暂无医生" />
</template>

<script lang="ts" setup>

	const props = defineProps({
		list: {
			type: Array
		},
		returnVisit:{
			type:String,
			default:'0'
		}
	});

</script>

<script lang="ts">
	export default {
		options: {
			multipleSlots: true,
			styleIsolation: 'shared',
			addGlobalClass: true,
			virtualHost: true
		}
	}
</script>

<style lang="scss" scoped>
	.newAlready{
		margin-top: 10rpx;
	}
	.doctor-data {
		margin-top: 15rpx;
		font-size: var(--gy-font-size-base);
		@include flex-between-center;
		view {
			flex-shrink: 0;
			text {
				margin-left: 10rpx;
				font-weight: bold;
				font-family: 'Swis721 Cn BT';
				font-size: var(--gy-font-size-medium);
			}
		}
		view+view{
			margin-left: 30rpx;
		}

	}

	.doctor-explain {
		margin-top: 15rpx;
		margin-bottom: 15rpx;
		font-size: var(--gy-font-size-base);
		@include text-ellipsis(2);
	}

	.doctor-tags {
		margin-top: 10rpx;
		:deep(.gy-tag) {
			margin-right: 20rpx;
			border: none;
		}
	}

	.doctor-action {
		margin-top: var(--gy-gap);
		@include grid(3);
		.doctor-action-item{
			font-size: 28rpx;
			line-height: 28rpx;
			@include flex-start;
			text{
				margin-right: 8rpx;
				margin-left: 10rpx;
			}
			:deep(.gy-price-text){
				margin-left: 10rpx;
			}
		}
		.doctor-action-item:nth-last-child(1){
			border-right:none;
		}
	}
	:deep(.doctor-tags){
		.warning{
			background-color: rgba(222, 144, 55, .1) !important;
		}
	}
	.doctor-isNotOnline{
		    height: 2em;
		    display: flex;
		    justify-content: center;
		    align-items: center;
		    display: inline-flex;
		    background-color: #eaeaea;
		    color: var(--gy-text-color-primary);
		    font-size: 0.7em;
		    border-radius: var(--gy-border-radius-medium);
		    overflow: hidden;
		    padding: 0 1em;
	}
</style>
